home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / layout / nsISVGRendererGlyphMetrics.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-05-08  |  7.4 KB  |  214 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsISVGRendererGlyphMetrics.idl
  3.  */
  4.  
  5. #ifndef __gen_nsISVGRendererGlyphMetrics_h__
  6. #define __gen_nsISVGRendererGlyphMetrics_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIDOMSVGRect; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsISVGRendererGlyphMetrics */
  21. #define NS_ISVGRENDERERGLYPHMETRICS_IID_STR "8665f6e9-6ed6-4ff8-b511-46c8068b3960"
  22.  
  23. #define NS_ISVGRENDERERGLYPHMETRICS_IID \
  24.   {0x8665f6e9, 0x6ed6, 0x4ff8, \
  25.     { 0xb5, 0x11, 0x46, 0xc8, 0x06, 0x8b, 0x39, 0x60 }}
  26.  
  27. /**
  28.  * \addtogroup renderer_interfaces Rendering Engine Interfaces
  29.  * @{
  30.  */
  31. /**
  32.  * One of a number of interfaces (all starting with nsISVGRenderer*)
  33.  * to be implemented by an SVG rendering engine. See nsISVGRenderer
  34.  * for more details.
  35.  *
  36.  * The SVG rendering backend uses this interface to communicate to the
  37.  * rendering engine-native glyph metrics objects.
  38.  *
  39.  * A glyph metrics object is instantiated by the backend for a given
  40.  * nsISVGGlyphMetricsSource object with a call to
  41.  * nsISVGRenderer::createGlyphMetrics(). The glyph metrics object is
  42.  * assumed to store a reference to its associated source object and
  43.  * provide metrics information about the (composite) glyph described
  44.  * by nsISVGGlyphMetricsSource::characterData,
  45.  * nsISVGGlyphMetricsSource::font, nsISVGGlyphMetricsSource::canvasTM, and
  46.  * other relevant style such as nsISVGGlyphMetricsSource::strokeWidth.
  47.  */
  48. class NS_NO_VTABLE nsISVGRendererGlyphMetrics : public nsISupports {
  49.  public: 
  50.  
  51.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISVGRENDERERGLYPHMETRICS_IID)
  52.  
  53.   /**
  54.    * Untransformed width of the composite glyph in pixels.
  55.    */
  56.   /* readonly attribute float advance; */
  57.   NS_IMETHOD GetAdvance(float *aAdvance) = 0;
  58.  
  59.   /**
  60.    * Untransformed bounding box of the composite glyph in pixel
  61.    * coordinates.
  62.    */
  63.   /* readonly attribute nsIDOMSVGRect boundingBox; */
  64.   NS_IMETHOD GetBoundingBox(nsIDOMSVGRect * *aBoundingBox) = 0;
  65.  
  66.   /**
  67.    * Get the untransformed bounding box of an individual glyph.
  68.    *
  69.    * @param charnum The index of the character in
  70.    * nsISVGGlyphMetricsSource::characterData whose glyph bounding box
  71.    * is to be determined
  72.    * @return The untransformed bounding box in pixel coordinates
  73.    */
  74.   /* nsIDOMSVGRect getExtentOfChar (in unsigned long charnum); */
  75.   NS_IMETHOD GetExtentOfChar(PRUint32 charnum, nsIDOMSVGRect **_retval) = 0;
  76.  
  77.   /**
  78.    * @name Baseline offset constants for getBaselineOffset()
  79.    * @{
  80.    */
  81.   enum { BASELINE_ALPHABETIC = 0U };
  82.  
  83.   enum { BASELINE_HANGING = 1U };
  84.  
  85.   enum { BASELINE_IDEOGRAPHC = 2U };
  86.  
  87.   enum { BASELINE_MATHEMATICAL = 3U };
  88.  
  89.   enum { BASELINE_CENTRAL = 4U };
  90.  
  91.   enum { BASELINE_MIDDLE = 5U };
  92.  
  93.   enum { BASELINE_TEXT_BEFORE_EDGE = 6U };
  94.  
  95.   enum { BASELINE_TEXT_AFTER_EDGE = 7U };
  96.  
  97.   /** @} */
  98. /**
  99.    * Retrieve the (y-axis) offset of the given baseline.
  100.    * 
  101.    * @param baselineIdentifier One of the BASELINE_* constants defined
  102.    * in this interface.
  103.    * @return Y-axis offset in pixels relative to top of bounding box.
  104.    */
  105.   /* float getBaselineOffset (in unsigned short baselineIdentifier); */
  106.   NS_IMETHOD GetBaselineOffset(PRUint16 baselineIdentifier, float *_retval) = 0;
  107.  
  108.   /**
  109.    * Called by this object's corresponding nsISVGGlyphMetricsSource as
  110.    * a notification that some of the source's data (identified by
  111.    * paramter 'updatemask') has changed.
  112.    *
  113.    * @param updatemask An OR-ed combination of the UPDATEMASK_*
  114.    * constants defined in nsISVGGlyphMetricsSource.
  115.    * @return PR_TRUE if the metrics have changed as a result of the
  116.    * source update, PR_FALSE otherwise.
  117.    */
  118.   /* boolean update (in unsigned long updatemask); */
  119.   NS_IMETHOD Update(PRUint32 updatemask, PRBool *_retval) = 0;
  120.  
  121. };
  122.  
  123. /* Use this macro when declaring classes that implement this interface. */
  124. #define NS_DECL_NSISVGRENDERERGLYPHMETRICS \
  125.   NS_IMETHOD GetAdvance(float *aAdvance); \
  126.   NS_IMETHOD GetBoundingBox(nsIDOMSVGRect * *aBoundingBox); \
  127.   NS_IMETHOD GetExtentOfChar(PRUint32 charnum, nsIDOMSVGRect **_retval); \
  128.   NS_IMETHOD GetBaselineOffset(PRUint16 baselineIdentifier, float *_retval); \
  129.   NS_IMETHOD Update(PRUint32 updatemask, PRBool *_retval); 
  130.  
  131. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  132. #define NS_FORWARD_NSISVGRENDERERGLYPHMETRICS(_to) \
  133.   NS_IMETHOD GetAdvance(float *aAdvance) { return _to GetAdvance(aAdvance); } \
  134.   NS_IMETHOD GetBoundingBox(nsIDOMSVGRect * *aBoundingBox) { return _to GetBoundingBox(aBoundingBox); } \
  135.   NS_IMETHOD GetExtentOfChar(PRUint32 charnum, nsIDOMSVGRect **_retval) { return _to GetExtentOfChar(charnum, _retval); } \
  136.   NS_IMETHOD GetBaselineOffset(PRUint16 baselineIdentifier, float *_retval) { return _to GetBaselineOffset(baselineIdentifier, _retval); } \
  137.   NS_IMETHOD Update(PRUint32 updatemask, PRBool *_retval) { return _to Update(updatemask, _retval); } 
  138.  
  139. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  140. #define NS_FORWARD_SAFE_NSISVGRENDERERGLYPHMETRICS(_to) \
  141.   NS_IMETHOD GetAdvance(float *aAdvance) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAdvance(aAdvance); } \
  142.   NS_IMETHOD GetBoundingBox(nsIDOMSVGRect * *aBoundingBox) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBoundingBox(aBoundingBox); } \
  143.   NS_IMETHOD GetExtentOfChar(PRUint32 charnum, nsIDOMSVGRect **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetExtentOfChar(charnum, _retval); } \
  144.   NS_IMETHOD GetBaselineOffset(PRUint16 baselineIdentifier, float *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBaselineOffset(baselineIdentifier, _retval); } \
  145.   NS_IMETHOD Update(PRUint32 updatemask, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Update(updatemask, _retval); } 
  146.  
  147. #if 0
  148. /* Use the code below as a template for the implementation class for this interface. */
  149.  
  150. /* Header file */
  151. class nsSVGRendererGlyphMetrics : public nsISVGRendererGlyphMetrics
  152. {
  153. public:
  154.   NS_DECL_ISUPPORTS
  155.   NS_DECL_NSISVGRENDERERGLYPHMETRICS
  156.  
  157.   nsSVGRendererGlyphMetrics();
  158.  
  159. private:
  160.   ~nsSVGRendererGlyphMetrics();
  161.  
  162. protected:
  163.   /* additional members */
  164. };
  165.  
  166. /* Implementation file */
  167. NS_IMPL_ISUPPORTS1(nsSVGRendererGlyphMetrics, nsISVGRendererGlyphMetrics)
  168.  
  169. nsSVGRendererGlyphMetrics::nsSVGRendererGlyphMetrics()
  170. {
  171.   /* member initializers and constructor code */
  172. }
  173.  
  174. nsSVGRendererGlyphMetrics::~nsSVGRendererGlyphMetrics()
  175. {
  176.   /* destructor code */
  177. }
  178.  
  179. /* readonly attribute float advance; */
  180. NS_IMETHODIMP nsSVGRendererGlyphMetrics::GetAdvance(float *aAdvance)
  181. {
  182.     return NS_ERROR_NOT_IMPLEMENTED;
  183. }
  184.  
  185. /* readonly attribute nsIDOMSVGRect boundingBox; */
  186. NS_IMETHODIMP nsSVGRendererGlyphMetrics::GetBoundingBox(nsIDOMSVGRect * *aBoundingBox)
  187. {
  188.     return NS_ERROR_NOT_IMPLEMENTED;
  189. }
  190.  
  191. /* nsIDOMSVGRect getExtentOfChar (in unsigned long charnum); */
  192. NS_IMETHODIMP nsSVGRendererGlyphMetrics::GetExtentOfChar(PRUint32 charnum, nsIDOMSVGRect **_retval)
  193. {
  194.     return NS_ERROR_NOT_IMPLEMENTED;
  195. }
  196.  
  197. /* float getBaselineOffset (in unsigned short baselineIdentifier); */
  198. NS_IMETHODIMP nsSVGRendererGlyphMetrics::GetBaselineOffset(PRUint16 baselineIdentifier, float *_retval)
  199. {
  200.     return NS_ERROR_NOT_IMPLEMENTED;
  201. }
  202.  
  203. /* boolean update (in unsigned long updatemask); */
  204. NS_IMETHODIMP nsSVGRendererGlyphMetrics::Update(PRUint32 updatemask, PRBool *_retval)
  205. {
  206.     return NS_ERROR_NOT_IMPLEMENTED;
  207. }
  208.  
  209. /* End of implementation class template. */
  210. #endif
  211.  
  212.  
  213. #endif /* __gen_nsISVGRendererGlyphMetrics_h__ */
  214.